<template>
	<view class="select-item">
		<navigator url="#" class="box" v-if="!isMore">
			<image :src="getImage('/select/chuancai.jpeg')" mode="aspectFill" class="pic"></image>
			<view class="mask">川菜</view>
			<view class="tab">热门</view>
		</navigator>
		
		<navigator url="" class="box more" v-else>
			<image :src="getImage('/select/chuancai.jpeg')" mode="aspectFill" class="pic"></image>
			<view class="mask">
				<uni-icons type='more-filled' size="34" color="#fff"></uni-icons>
				<text>更多</text>
			</view>
		</navigator>
	</view>
</template>

<script setup>
import { defineProps } from 'vue';

	
defineProps({
	isMore: {
		type:Boolean,
		default:false
	}
})
	
const getImage = (path) => {
	return "https://xiaoxiaobaiyang.oss-cn-shenzhen.aliyuncs.com/food_moment_discover/image" + path
}

</script>

<style lang="scss" scoped>
.select-item{
	.box{
		height: 340rpx;
		border-radius: 10rpx;
		overflow: hidden;
		position: relative;
		.pic{
			width: 100%;
			height: 100%;
		}
		.mask{
			width: 100%;
			height: 70rpx;
			position: absolute;
			bottom: 0;
			left: 0;
			background-color: rgba(0, 0, 0, 0.2);
			display: flex;
			align-items: center;
			justify-content: center;
			backdrop-filter: blur(20rpx);
			color: #fff;
			font-weight: 500;
			font-size: 30rpx;
		}
		.tab{
			position: absolute;
			left: 0;
			top: 0;
			background-color: rgba(54, 201, 162, 0.6);
			backdrop-filter: blur(20rpx);
			color: #fff;
			font-weight: 100;
			font-size: 22rpx;
			padding: 6rpx 14rpx;
			border-radius: 0 0 20rpx 0;
		}
	}
	.box.more{
		.mask{
			width: 100%;
			height: 100%;
			flex-direction: column;
			text{
				font-size: 28rpx;
			}
		}
	}
}
</style>